<?php

if (!defined('PROJECT_ROOT')) {
    // 引用框架前需要先定义项目的根路径
    die('project path no define');
}
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

defined('YII_SOFT_PATH') or define('YII_SOFT_PATH', __DIR__);

require YII_SOFT_PATH . '/vendor/autoload.php';
require YII_SOFT_PATH . '/vendor/yiisoft/yii2/Yii.php';

$config = require PROJECT_ROOT. '/config/web.php';
$application = new yii\web\Application($config);
$application->run();
